package book;

// 图书类
class Book {
    String ISBN;        // 国际标准书号
    String bookName;    // 书名
    String author;      // 作者
    String publisher;   // 出版社
    double price;       // 定价

    public Book(String isbn, String bname, String bauthor, String bpublisher, double bprice) {
        ISBN = isbn;
        bookName = bname;
        author = bauthor;
        publisher = bpublisher;
        price = bprice;
    }

    public String getISBN() {
        return ISBN;
    }

    public String getBookName() {
        return bookName;
    }

    public String getAuthor() {
        return author;
    }

    public String getPublisher() {
        return publisher;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double newprice) {
        price = newprice;
    }

    public String toString() {
        return "书的信息:" + getISBN() + "|" + getBookName() + "|" + getAuthor() +
                "|" + getPublisher() + "|" + getPrice();
    }
}
